package com.techsen.tsweb.sys.domain;

import com.techsen.tsweb.core.domain.BaseEntity;
import com.techsen.tsweb.sys.security.Principal;

/**
 * 角色
 */
public class Role extends BaseEntity<Role> implements Principal {

    private static final long serialVersionUID = -4428849169645084223L;
    
    /**
     * 角色名
     */
    private String name;

    public String getName() {
        return name;
    }

    public Role setName(String name) {
        this.name = name;
        return this;
    }

    @Override
    public String getPrincipalType() {
        return this.getClass().getSimpleName().toLowerCase();
    }

    @Override
    public String getPrincipalId() {
        return this.id;
    }

}
